/**
 *排除不需要的key
 * @param arrary 要排除元素的母体
 * @param obj    排除列表数组
 */
function removeProperty(arrary,obj) {
    arrary.forEach(function (val,index) {
        delete obj[val];
    });
}

/**
 * 将所需要的对象转移到新数组对象
 * @param father  原始对象
 * @param spacal  需要转移的KEY数组
 * @param vue     vue对象
 */
function model2arr(father,vue,spacal) {
    for(var key in spacal){
        vue[key] = spacal[key];
        var arr = spacal[key];
        arr.forEach(function (val,index) {
            delete father[val];
        });


    }
}

/**
 * 从返回的对象里面提取属于Hidden字段存放到vue的hidden对象里面,hiddenObj存储需要隐藏的字段key,value，如{id:1}
 * @param hiddenArr 需要提取的字段的数组集合
 * @param obj       服务器返回的单个对象
 */
function makeHiddenObj(hiddenArr,obj,hiddenObj) {
    hiddenArr.forEach(function (val,index) {
        hiddenObj[val] = obj[val];
        delete obj[val];
    });
}

/**
 * 通过VUE的key合并多个vue的子对象
 * @param arrKeys  存储要合并对象名的数据[needhidden,unedit]
 * @param mainModel 要合并的主对象
 * @vue vue对象      通过ARRKEYS里面的元素，得到与mainModel合并的对象,vue[needhidden] == {id:1}
 */
function  extendJsons(arrKeys,mainModel,vue) {
    arrKeys.forEach(function (val,index) {
        mainModel = $.extend(mainModel,vue[val]);
    });

    
}

/**
 * 清空对象属性值
 * @param obj
 */
function setObjProp2Null(obj) {
    var o = obj;
    for(var key in o){
        o[key]=null;
    }
    return o;
}

function checkNum(num) {
    if (isNaN(num)){
        return 0;
    }else {
        return num;
    }
}

function ShowTheObject(obj){
    var des = "";
    for(var name in obj){
        des += name + ":" + obj[name] + ";";
    }
    console.log(des);
}
var il8message={
    roleName:'<spring:message code="role.name"/>',
    roleSign:"标志",
    description:"描述",
    kpi:{
        fid:"消息ID",
        ctrlopedepartment:'营业点ID',
        exp:"出港",
        imp:'进港',
        expimp:'进港/出港',
        waybillid:"运单ID",
        waybilltype:"运单类型",
        waybillpre:"运单前缀",
        waybillno:"运单后缀", //运单号
        waybillfullnum:'运单号',
        domint:"国内/国际", //国内，国际
        segment:"航段",
        sairportid:"航班起点站",
        eairportid:"航班到达站",
        scityid:"起始城市",
        ecityid:"到达城市",
        istrans:"是否中转",
        customscode:"海关关区",
        specoperid:"特殊处理代码",
        airline1:"承运人",
        deststation1:"到达站",
        destcity1:"到达城市",
        airline2:"承运人2",
        deststation2:"到达站2",
        destcity2:"到达城市2",
        airline3:"承运人3",
        deststation3:"到达站3",
        destcity3:"到达城市3",
        airline4:"承运人4",
        deststation4:"到达站4",
        destcity4:"到达城市4",
        productid:"货物ID",
        productname:"货物名称",
        planeno:"机号",
        flightno:"航班号",
        ightdate:"航班日期",
        agentid:"代理人ID",
        agentname:"代理人名称",
        shprname:"发货人",
        shprtel:"发货人电话",
        shpraddress:"发货人地址",
        shpragent:"发货代理人",
        cnsnname:"收货人",
        cnsntel:"收货人电话",
        cnsnaddress:"收货人地址",
        cnsnagent:"收货代理人",
        carrycost:"运费金额",
        carryrate:"运费费率",
        agentcost:"代理费用",
        agentrate:"代理费率",
        shippervalue:"声明价值",
        insurevalue:"保险金额",
        hbillqty:"分单总数",
        pcs:"件数",
        weight:"重量",
        vol:"体积",
        curweek:"开始日",
        curmonth:"开始月",
        curyear:"开始年",
        endweek:"结束日",
        endmonth:"结束月",
        endyear:"结束年",
        createtime:"记录创建时间",
        updatetime:"最后更新时间",
        fdsrecid:"航班ID",
        uldtype:"板箱类型",
        uldno:"板箱编码",
        uldcorp:"板箱归属航空公司",
        aircorpid:"航空公司ID",
        planetype:"机型",
        flightdate:"航班日期",
        sptime:"航班计划起飞",
        satime:"航班实际起飞",
        eptime:"航班计划到达",
        eatime:"航班实际到达",
        operuserid:"操作人id",
        operdepartid:"操作人营业点",
        operdate:"操作日期"





    }

};